<template>
	<div>
		<el-card class="box-card" style="margin-top:15px">
			<div slot="header" class="clearfix">
				<span style="font-weight: bold">病人要素</span>
			</div>
			<el-row :gutter="15">
				<el-form class="demo-form-inline" label-width="100px">
					<el-col :span="8">
						<el-form-item label="医保病人">
							<el-select v-model="submit.ybbr" size="small" placeholder="请选择">
								<el-option
								  v-for="item in ybbrOptions"
								  :key="item.value"
								  :label="item.label"
								  :value="item.value">
								</el-option>
							  </el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="军人">
							<el-select v-model="submit.jr" size="small" placeholder="请选择">
								<el-option
								  v-for="item in jrOptions"
								  :key="item.value"
								  :label="item.label"
								  :value="item.value">
								</el-option>
							  </el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="就诊卡号">
							<el-input v-model="submit.jzkh" size="small" clearable placeholder="请输入就诊卡号"></el-input>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="性别">
							<el-select v-model="submit.sex" size="small" placeholder="请选择">
								<el-option
								  v-for="item in sexOptions"
								  :key="item.value"
								  :label="item.label"
								  :value="item.value">
								</el-option>
							  </el-select>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="身高(CM) >=">
							<div style="display:flex;flex-wrap: nowrap;" class="dialogFirstRow">
								<el-input v-model="submit.sg_low"  v-only-number="{max:10000000000,min:0,precision:0}" size="mini"></el-input>
								<label><= &nbsp;</label>
								<el-input v-model="submit.sg_high"  v-only-number="{max:10000000000,min:0,precision:0}" size="mini"></el-input>
							</div>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="体重(Kg) >=">
							<div style="display:flex;flex-wrap: nowrap;" class="dialogFirstRow">
								<el-input v-model="submit.weight_low" v-only-number="{max:10000000000,min:0,precision:0}"  size="mini"></el-input>
								<label><= &nbsp;</label> 
								<el-input v-model="submit.weight_high" v-only-number="{max:10000000000,min:0,precision:0}" size="mini"></el-input>
							</div>
						</el-form-item>
					</el-col>
					<el-col :span="16" v-if="ageFlag">
						<el-form-item label="年龄 >=">
							<div style="display:flex;flex-wrap: nowrap;" class="dialogFirstRow">
								<el-input v-model="submit.age_low" v-only-number="{max:10000000000,min:0,precision:0}" size="mini"></el-input>
								<el-select v-model="submit.age_low_unit" size="mini">
									<el-option v-for="item in ageOptions" :key="item.value" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
								<label><= &nbsp;</label> 
								<el-input v-model="submit.age_high" v-only-number="{max:10000000000,min:0,precision:0}" size="mini" style="margin-left:10px;"></el-input>
								<el-select v-model="submit.age_high_unit" size="mini">
									<el-option v-for="item in ageOptions" :key="item.value" :label="item.label" :value="item.value">
									</el-option>
								</el-select>
							</div>
						</el-form-item>	
					</el-col>
				</el-form>
			</el-row>
		</el-card>
	</div>
</template>

<script>
	export default {
		name:"GzCard",
		props:{
			ageFlag:{
				default:"true"
			}
		},
		data () {
			return {
				ybbrOptions:[
					{
					  value: '',
					  label: '不选择'
					}, {
					  value: '35c82c206c1920803d4679a1efa91990',
					  label: '市医保'
					}, {
					  value: '73f03d322790a62a464deb7596ec94a0',
					  label: '镇医保'
					}
				],//医保病人options
				jrOptions:[
					{
					  value: '',
					  label: '不选择'
					}, {
					  value: '6512bd43d9caa6e02c990b0a82652dca',
					  label: '11'
					}, {
					  value: 'd3aa3171f03e8b0a76fa8462db76dd65',
					  label: '师长'
					}
				],//军人options
				sexOptions:[
					{
					  value: '',
					  label: '不选择'
					}, {
					  value: '1',
					  label: '男'
					}, {
					  value: '2',
					  label: '女'
					}
				],//性别options
				ageOptions:[
					{
					  value: '岁',
					  label: '岁'
					},
					{
					  value: '月',
					  label: '月'
					},
					{
					  value: '天',
					  label: '天'
					},
				],//年龄options
				submit:{
					ybbr:"",
					jr:"",
					jzkh:"",
					sex:"",
					sg_low:"",
					sg_high:"",
					weight_low:"",
					weight_high:"",
					age_low:"",
					age_low_unit:"岁",
					age_high:"",
					age_high_unit:"岁"
				}
			}
		},
		methods:{
			resetFun(){
				this.submit={
					ybbr:"",
					jr:"",
					jzkh:"",
					sex:"",
					sg_low:"",
					sg_high:"",
					weight_low:"",
					weight_high:"",
					age_low:"",
					age_low_unit:"岁",
					age_high:"",
					age_high_unit:"岁"
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.el-card {
		margin-left: 3px;
	}
	.dialogFirstRow>>>.el-input {
		width: 70px;
		margin-right: 10px;
	}
	
	.el-form-item.s_selectbox>>>.el-form-item__content {
		width: 80%;
	}
	
	
	.demo-form-inline>>>.el-form-item {
		margin-bottom: 0px;
	}
	
	.dialogFirstRow>>>label {
		height:41px;
		display:inline-block;
	}
</style>
